System and method for streaming and recording video

ABSTRACT

In at least one embodiment, a method and a computer system for implementing the method are provided. The method may include streaming temporal video to obtain a streamed temporal video having a current incomplete segment and dynamically buffering the current incomplete segment to store data associated thereto and a current incomplete segment buffer. The method may further include receiving first and second inputs to obtain start and end time markers for a first video segment and continuously recording the streamed temporal video based on receipt of the first input and until receipt of the second input to obtain a raw recorded first video segment. A recorded first video segment may be generated based on the raw recorded first video segment and the current incomplete segment data. The method may be used to generate recordings of discontinuous events from streaming video, for example, individual plays during sporting events.

TECHNICAL FIELD

One or more embodiments relate to a system and method for streaming andrecording video, for example, of sporting or other events.

BACKGROUND

Watching film following an athletic event is a common practice in manysports and activities. The game film may allow coaches and athletes tosee what went right or wrong during a certain play or portion of anevent. Coaches and athletes may then use the information gained tochange their practice and training, their strategy for the next event,or make other adjustments. During an event, some athletes and sportsteams may take still photographs that may then be printed or shown tothe players and coaches. These still photographs may help visualizeformations and isolated incidents, but they do not provide the volume ofinformation that video does.

SUMMARY

In at least one embodiment, a computer system is provided for recordinga number of segments of a discontinuous activity. The system maycomprise a computer having non-transitory memory for storing machineinstructions that are to be executed by the computer, the machineinstructions when executed by the computer implement the followingfunctions: streaming temporal video of the discontinuous activity toobtain a streamed temporal video having a current incomplete segment;dynamically buffering the current incomplete segment to store dataassociated thereto and a current incomplete segment buffer; receivingfirst and second inputs to obtain start and end time markers for a firstsegment of the number of segments; continuously recording the streamedtemporal video based on receipt of the first input and until receipt ofthe second input to obtain a raw recorded first video segment; andgenerating a recorded first video segment based on the raw recordedfirst video segment and the current incomplete segment data.

The functions may further include buffering header information of thestreamed temporal video and including the header information in therecorded first video segment. Dynamically buffering may includebuffering an I-frame and one or more P-frames comprised of a number ofP-frames. The I-frame may have an associated I-frame time marker and theone or more P-frames may have one or more associated P-frame timemarkers and the P-frames having associated time markers between theI-frame and the start time marker may be included in the currentincomplete segment. In one embodiment, only a most recent I-framerelative to the start time marker is dynamically buffered. The functionsmay further comprise clearing the current incomplete segment buffer whena new I-frame is generated. Dynamically buffering may include expandingor contracting the size of the current incomplete segment buffer basedon the size of or the number of P-frames. The functions may furthercomprise returning the size of the current incomplete segment buffer toan initial size after it has been cleared. The functions may furthercomprise adjusting a time offset of the recorded first video segment.

In at least one embodiment, a method is provided. The method may includestreaming temporal video to obtain a streamed temporal video having acurrent incomplete segment; dynamically buffering the current incompletesegment to store data associated thereto and a current incompletesegment buffer; receiving first and second inputs to obtain start andend time markers for a first video segment; continuously recording thestreamed temporal video based on receipt of the first input and untilreceipt of the second input to obtain a raw recorded first videosegment; and generating a recorded first video segment based on the rawrecorded first video segment and the current incomplete segment data.

The method may further comprise buffering header information of thestreamed temporal video and including the header information in therecorded first video segment. Dynamically buffering may includebuffering an I-frame and one or more P-frames comprised of a number ofP-frames. The I-frame may have an associated I-frame time marker and theone or more P-frames may have one or more associated P-frame timemarkers and the P-frames having associated time markers between theI-frame and the start time marker may be included in the currentincomplete segment. In one embodiment, only a most recent I-framerelative to the start time marker is dynamically buffered. The methodmay further include clearing the current incomplete segment buffer whena new I-frame is generated. Dynamically buffering may include expandingor contracting the size of the current incomplete segment buffer basedon the size of or the number of P-frames. The method may further includereturning the size of the current incomplete segment buffer to aninitial size after it has been cleared. The method may further includeadjusting a time offset of the recorded first video segment.

In at least one embodiment, a method of recording and distributing anumber of segments of a sporting event is provided. The method mayinclude: streaming temporal video of the event to obtain a streamedtemporal video having a current incomplete segment; dynamicallybuffering the current incomplete segment to store data associatedthereto and a current incomplete segment buffer; receiving first andsecond inputs to obtain start and end time markers for a first videosegment, the start and end time markers being associated with a startand end of a segment of the event; continuously recording the streamedtemporal video based on receipt of the first input and until receipt ofthe second input to obtain a raw recorded first video segment;generating a recorded first video segment based on the raw recordedfirst video segment and the current incomplete segment data; anddistributing the recorded first video segment to a remote device over anetwork.

In one embodiment, dynamically buffering includes buffering an I-frameand one or more P-frames and the method further includes clearing thecurrent incomplete segment buffer when a new I-frame is generated.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic of a network and devices connected to the network,according to an embodiment;

FIG. 2 is an embodiment of a user interface used for recording streamingvideo, according to an embodiment;

FIG. 3 is another embodiment of a user interface used for recordingstreaming video, according to an embodiment;

FIG. 4 is another embodiment of a user interface used for recordingstreaming video, according to an embodiment;

FIG. 5 is another embodiment of a user interface used for recordingstreaming video, according to an embodiment;

FIG. 6 is another embodiment of a user interface used for recordingstreaming video, according to an embodiment;

FIG. 7 is a schematic of the frame sequence in a temporal video segment,according to an embodiment;

FIG. 8 is a schematic of a dynamic buffer, according to an embodiment;

FIG. 9 is a schematic of a dynamic buffering system, according to anembodiment;

FIG. 10 is another schematic of a dynamic buffering system, according toan embodiment; and

FIG. 11 is a schematic of temporal video time offset, according to anembodiment.

DETAILED DESCRIPTION

As required, detailed embodiments of the present invention are disclosedherein; however, it is to be understood that the disclosed embodimentsare merely exemplary of the invention that may be embodied in variousand alternative forms. The figures are not necessarily to scale; somefeatures may be exaggerated or minimized to show details of particularcomponents. Therefore, specific structural and functional detailsdisclosed herein are not to be interpreted as limiting, but merely as arepresentative basis for teaching one skilled in the art to variouslyemploy the present invention.

With reference to FIG. 1, a system 10 is provided for streaming andrecording video. The system 10 may include a computer server 12, forexample, a PC web server having a display and a user input device suchas a mouse and keyboard or a touch-screen. The system may be connectedto a network 14, which may be wired and/or wireless. The network 14 maybe a local network or a larger, public network, such as the Internet.The system 10 may further include network-attached storage (NAS) 16 tostore and share files with devices on the network 14. One or morenetwork IP cameras 18 may be included in the system 10 and connected tothe network 14. In addition to, or instead of IP cameras, analog camerasconnected to an IP encoder may also be included in the system 10. Thesystem 10 may also include one or more client devices 20 connected tothe network 14. The client devices 20 may include PCs, laptops,smartphones, tablets, media players, or any other network-capabledevices. The system 10 may also include additional components, such asthose disclosed in U.S. Pat. No. 6,891,566 and U.S. Patent ApplicationPublication No. 2007/0237141, the disclosures of which are herebyincorporated in their entirety by reference herein.

Software may be stored in a recording medium on a PC or other computingplatform within the system 10, or any other device with recordingcapabilities. In one embodiment, the software is stored on the PC webserver 12. However, the software may also be stored on one or more ofthe client devices 20. The software may also be stored on the IPcamera(s) 18 and recordings may be stored on local memory on thecamera(s) 18. The recordings may then be pulled or pushed to the server12 or client devices 20. The software may include a user interface 30,shown in FIGS. 2-6. In one embodiment, the user interface may include atop menu bar 32 with numerous feature options. One or more viewingwindows 34 may be provided for viewing video feeds from the one or moreIP cameras 18. The software may further include an input, such as aStart Streaming button, to initiate streaming of video from the one ormore cameras 18 and an input, such as a Stop Streaming button, toterminate streaming of the video. The Start Streaming and Stop Streamingbuttons may be the same (i.e., Start/Stop). The software may alsoinclude inputs to start and stop recording of the streaming video, suchas separate or combined Start and Stop Recording buttons 36. The inputsto start and/or stop the streaming or recording may include any suitableinput method, such as on-screen button(s) that may be clicked orpressed, text commands, gestures, or others. In addition, the input tostart/stop may be received from a remote device via a network messagefrom an IP-enabled device (e.g., smart phone, tablet, PC, etc.). Inembodiments where a sporting or other event is to be recorded, a graphic38 (e.g., a photo or representation/schematic) of the field of play,stage, or location of the event may be displayed. The software mayfurther allow a user to select pan-tilt-zoom (PTZ) presets for adjustingthe position of the one or more cameras. The presets may be accessed bya pull-down menu, joystick controller, mouse, or any other suitable userinterface or method.

When the software application is launched, it may be in a staticconfiguration, wherein no video is streaming or being recorded. If auser selects an input to start streaming, the IP cameras 18 may beginstreaming video, which may be displayed in the one or more viewingwindows 34. The video may be streamed at any suitable frame rate, forexample, at 30 FPS. However, the frame rate may be set higher or lower,depending on the desired settings and/or the hardware or networkcapabilities. The frame rate may also be varied during the streaming.

Each camera may have stored thereon preset position names and indices.For example, a camera may have a plurality of preset positions 40 on afield that may be labeled. The positions may be labeled by a name and/ornumber, for example, numbers 1-8 as shown in FIGS. 2-3. The presetlocations may correspond to areas of increased activity or areas ofimportance for the sport or event being recorded. For example, the goallines of a football field, to determine if a player has scored atouchdown or not. The software may poll the camera(s) 18 for the presetposition names and indices and allow the user to select them. Forexample, the software may populate a pull-down menu including theposition names and/or indices. The camera positions may also be shownvisually on a graphic, such as a visual representation of the field ofplay or event space. A user may then select the preset by clicking orotherwise selecting the desired position (e.g., touching on atouch-screen).

The user interface may allow a user to select a play mode, for example,using a play mode pull-down menu 42 that may be populated with the modesof play. For a sporting event, the menu may include options such asOffense, Defense, Kicking, Special Teams, etc. The software may build aplurality of recording paths based on the play mode specified. Thesepath(s) may reside on a single recording device, multiple devices, orany combination thereof. The recording path may also be based on a rootpath, which may be provided in a configuration file that the softwarereads during startup or another designated time.

Once streaming has been initiated by the user, streaming video may bedisplayed in the one or more viewing windows 34. Regardless of whetherthe software includes a viewing window, an operator may make inputsbased on watching or listening to the live action of the event (e.g., inperson, on TV, on radio, etc.). Alternatively, inputs may be madeautomatically without an operator, for example, based an automated timeclock signal (e.g., a game clock) or on a fixed periodic basis. Inaddition to the streaming video itself, additional information may bedisplayed on screen, as well, such as resolution, FPS, a runningdate/time stamp, or other information. Once the user has videostreaming, it may be left streaming for the duration of the game orevent. Alternatively, the user could start and stop streaming throughoutthe event, for example, during breaks in the game (e.g., halftime orintermission) or during portions that do not require analysis or may beconfidential. The user may adjust the camera(s) 18 during streaming. Forexample, the user may move the camera(s) 18 to one of the presetsdiscussed above, click or select a location on the video display tocenter that spot to the center of the viewing window, zoom in or out,adjust the PTZ manually, use vectored movement, use automatic tracking,or make other adjustments to the cameras. A joystick, touch-screen, orother interface may also be provided for camera manipulation. A varietyof camera and/or lens types may also be included in the system 10 andcontrolled by the user. For example, a static camera having a very widefield of view may be positioned and configured to view the entireplaying field or event surface at once. A user may then select (e.g., byclicking) a portion of the playing field and a PTZ camera correlated tothe static camera's position may move to the selected position for amore detailed, different, or up-close view.

When the first game or event action that a user desires to record isabout to start (e.g., a football kickoff), the user may select the playmode (e.g., special teams) and then initiate recording. A recordingstatus message with information such as elapsed REC time may bedisplayed. The live video is recorded to a recording medium, which maybe local (e.g., PC server 12) or remote (e.g., on the network 12). Inone embodiment, the recording medium may be located at the camera(s) 18.The recording medium may be any suitable recording medium, such as adisk drive, thumb drive, hard disk, solid state drive, NAS, opticalmedia, local or remote RAM memory, or other capable recording media. Thepath recorded to may be derived from the root path, the game or eventname, the play mode selected, or any other user-customized or defaultsetting. The root path and game/event name may remain constant duringany game or event until it ends.

When the game or event action ends (e.g., a player is tackled), theoperator may click the REC button again, a STOP button, or otherwiseinstruct the software to stop recording. The video may then continuestreaming, but without being recorded. The segment of recorded video maythen be written to the specified directory, described above. The videosegment may receive a hierarchical time stamp 44 and/or sequence number46. The sequence number 46 may increment from 1 to the last play of thegame and may be used as a prefix, suffix, or other positional data forthe segment/file name. This may allow for a unified or consistent methodof reference for end users analyzing plays or segments during thegame/event, or after. The video segment may then be made available tousers on client devices 20. The video segment may be available directlyfrom the location at which it was generated, such as the local storageof the computer running the software, or the video segment may be sentto another location for hosting, such as the PC server 12. In oneembodiment, the video segments may be stored on and retrieved from oneor more of the IP cameras 18.

In some embodiments, the initiating of recording, the stopping of therecording, and the buffering and other processing of the video segmentsmay be done on a single computing platform or terminal. Once the videosegment is complete, it may be copied or transferred to anothercomputing platform, such as a web server, to be made available to users.The initiating, stopping, and processing of a recording may require morecomputing and/or processing power than some devices have available. Forexample, high quality video such as high definition (HD) or 4 k videomay require more computing power than some inexpensive and/or smalldevices have available. Accordingly, in some embodiments, the initiatingand stopping of the recording may be performed on one device in the formof start and stop time markers or positions, which are then forwarded toanother device, which may have more computing power. The second device(e.g., PC, server, or other computing platform) may stream the event anduse the start and stop time markers to generate the video segments,which may then be accessed directly or may be sent to a video server fordistribution. The use of logical start/stop markers may therefore allowless powerful devices to emulate a terminal, while using a more powerfulcomputing platform to do the more intense processing.

In another embodiment, video segments may be generated at a later timeusing a batch process. A terminal computing platform (e.g., a smartphone/watch, tablet, PC, etc.) may be used to input start and endmarkers or times for each video segment. The entire event (or portionsthereof) may be recorded on the same or a different computing platform.The collection of start and end markers may then be processed intodiscrete video segments at a later time in a sequential or parallelmanner. The collection of start and end markers may be batch processedon the same device used to collect them, or the collection may be sentto another device for processing (e.g., a host computer with moreprocessing power than the terminal). The start and end markers may becollected for an entire event and then processed as a whole, or acertain number of start and end markers may be collected and processed.Accordingly, there may be a single batch (e.g., a whole game) ormultiple batches (e.g., after each period, halftime, intermission, etc.)for a single event.

When the next play is about to begin (e.g., the players break thehuddle) the operator may initiate recording again and a new segment iscreated and recorded according to the same process. If the play modechanges, for example, if a turnover occurs or a team scores or has topunt, the operator selects the new appropriate play mode (e.g., from theplay mode pull down 42). Successive recording sessions may then bewritten to the directory for the appropriate play mode. The play modemay define a record path suffix.

An operator may therefore control the starting and stopping of therecording throughout a game or event, only recording segments of videothat are desired or important. In addition to manual starting andstopping of recordings, the start and stop may be tied to events orclocks being used in the sport or event. If the sport or event has agame clock or similar master time controller, the start and stop may betied thereto. In football, for example, recording could start when thegame clock starts and stop when the clock stops or recording could startwhen the play clock hits a predetermined number and stop when the playclock resets, or other combinations. The starting and stopping of therecording may also be done autonomously according to what is happeningon the field or during the event. For example, software on the camera(e.g., edge detection software) may recognize when a huddle starts orbreaks or when a referee steps onto the field or makes a certain motion.The recorded files may be organized by play mode (e.g., offense,defense, etc.) and may include a sequential number as a prefix, suffix,or other positional data. The files may include other information in thefile name, such as a time and/or date stamp, as well.

When a user on a client device 20 wants to view a recorded videosegment, they can use media player software on the client device 20 toaccess the game or event recordings. The software may include an HTML 5application having a web interface, which may run on a PC, Apple,Android, iPad, iPhone, Linux, and virtually every other type of device.The user(s) may select from a list of games/events, which may includethe game or event that is currently being streamed/recorded. The usermay select to view only a subset of recordings, for example, based onthe play mode (e.g., offense, defense, etc.). As discussed above, therecordings may include prefixes and suffixes that may correspond to playorder/number, play type, time, date, or other indicators.

The user(s) may then select a video segment (e.g., a play) and view therecording on the client device 20. As soon as a video segment is stored,it may be available to the users on the client devices. Accordingly,users (e.g., coaches or players) may instantly recall the last play (orany other play) on the sidelines, in a coaching booth, or elsewhere. Theclient devices may be notified that a new play is ready, for example,with an audible sound, vibration of the device, a visual alert, otheralerts, or a combination thereof. The alert may be substantiallyinstant, such as within a second of the finishing of the recording.Recordings may also be automatically queued up and/or displayed on theclient device, such as the last record play/event. Multiple clientdevices 20 may be used simultaneously, and they may view the same playsor different plays at any time.

In at least one embodiment, the video is recorded in a temporal fileformat. In one embodiment, the video is recorded in H.264 or MPEG4(MP4). The video segment files may be native MP4 and playback on anydevice supporting MP4, which is an industry standard. Other file formatsmay also be used, such as MJPEG or other encoded formats. In someembodiments, non-temporal file formats may be used.

Temporal video, such as H.264, may provide smaller file sizes relativeto non-temporal video. Temporal video may therefore allow for longerrecording and reduced memory requirements. Smaller file sizes may alsoimprove the user experience for users on devices without a high-speedinternet connection (e.g., Edge or 3G). However, there are significantchallenges when trying to request mid-stream recording in a temporalformat of a video that is already streaming. As known by one of ordinaryskill in the art, temporal video uses data compression algorithms thatuse at least two different frame types, including “I-frames” and“P-frames.” I-frames (also called intra coded or key frames) contain asubstantially complete frame or image, and do not reference otherframes. P-frames (also called predicted frames) may reference otherframes and contain incomplete frames that do not provide a full image bythemselves. P-frames may include, for example, only image data that haschanged since the last I or P-frame. Therefore, an algorithm may specifythat each I-frame is followed by a certain number of P-frames and then anew I-frame. The number of P-frames between I-frames may changedepending on what is being recorded. The P-frames may be used toreconstruct the motion of the preceding I-frame to create a full image.This system allows for increased data compression and, therefore, lowerfile sizes. Other frame types may also be included in temporal video,such as B-frames (bi-directional predicted frames), and may be bufferedin a similar manner to P-frames.

The I and P-frames may cause a significant problem when trying to recordtemporal video mid-stream. An example of a video stream is shown in FIG.7, where point A represents the Sequence Parameter Set (SPS) and PictureParameter Set (PPS) header information, each point B represents anI-frame and each point C represents a collection of P-frames. Points Dand E represent the initiating and ending of a recording, respectively.Recordings initiated midstream, such as at frame P8 between IF-2 andIF-3, will be missing the required prior I-frame IF-2 and P-framesP1-P7. Therefore, the recording will show corrupted video or no video atall until the next I-frame arrives. For example, if recording wasstarted at P8 in the sequence show in FIG. 7, then the previous 7P-frames and the preceding I-frame would all be lost. No image would berecorded until the next I-frame, IF-3. Depending on the algorithm andthe subject matter being recorded, the next I-frame could be delayed byseveral seconds or longer, leading to a substantial amount of missedvideo. During this time, critical game events may be missed.Furthermore, for recordings that are initiated after the first I-framehas been discarded, the buffer would not include the header informationA, which may render the entire video segment useless, since the headerinformation is often a critical component of the stream.

One solution to this problem would be to record in non-temporal videoformats, such as MJPEG, where video is discreet and contained in eachframe. However, this leads to very large file sizes, which are notdesirable and may prevent some users from viewing the recordings.

Another solution is to use a conventional buffer, such as a ring buffer.Conventional ring buffers have a fixed size and will therefore store apredetermined amount of data before dumping the data and starting over.Ring buffers are designed for applications such as security systems,where it may be desirable to capture “pre-alarm” images that occur priorto an alarm being tripped. In this way, a certain fixed length of timebefore the alarm is tripped may be recorded (e.g., a few seconds). Thistype of buffer will not work effectively for temporal recording becausethe buffer may fill up and dump the data that includes the precedingI-frame. Alternatively, if the buffer size is too large, the buffer maystore many cycles of I and P-frames before dumping and would thereforestore too large of a file and may include parts of the game or eventaction that were not intended to be recorded.

In one embodiment, a dynamic buffer 50 is provided which may buffer tomemory the prior I-frame and P-frame data in a rolling buffer andconcatenate it to the beginning of any recording that is about to bestarted, midstream. In one embodiment, the dynamic buffer 50 may be asingle buffer, however, the buffer may be divided into two or morebuffers. The Sequence Parameter Set (SPS) and Picture Parameter Set(PPS) header data may be stored in the dynamic buffer such that it canbe added to the beginning of any video segment generated. In embodimentswith a single dynamic buffer, the header data may be stored such that itis not written over when the buffer is flushed, thereby preserving theheader data for each recorded segment. In embodiments where there aretwo or more dynamic buffers, a first dynamic buffer may be initiallycreated to receive the header data and a second dynamic buffer may becreated to buffer the I and P-frames of the streaming video.

The dynamic buffer may be configured to only collect the necessaryframes needed to rebuild the video segment. The buffer may store anI-frame and all succeeding P-frames until a new I-frame occurs. Thebuffer is dynamic because it may shrink or grow, based on the numberand/or varying size (e.g., in bytes) of the P-frames or other data types(e.g., B-frames), as illustrated in FIG. 8. The size of the buffer mayalso be adjusted based on the size of the I-frame preceding the P-frames(or other data types), the size/number of other streaming data, or acombination of any of the above parameters. The dynamic buffer 50 maybegin storing P-frames and, as it approaches its capacity, maydynamically expand to a larger size 52 and allow additional P-frames tobe stored until all necessary frames are buffered. When a new I-frameoccurs, the dynamic buffer may be configured to dump all precedingframes and start over with the new I-frame and the succeeding P-frames.Since the video is streaming, but only recorded when desired, the onlyI-frame that is necessary to buffer is the one preceding the instant auser initiates recording. The dynamic buffer 50 may be configured tohave an initial size 54, which it returns to after flushing.Alternatively, the buffer size may continuously change based on thespace required and not return to a set size after flushing.

An example of a two-buffer system is shown in FIGS. 9 and 10. FIG. 9illustrates how the buffer system works prior to the initiation of arecording (e.g., video is just being streamed). The first buffer BF-1 isconfigured to receive and store SPS and PPS header data at F. The secondbuffer BF-2 is configured to store I and P-frames. The second bufferBF-2 receives and stores the first I-frame IF-1 at G and beginsreceiving and storing subsequent P-frames at H until the final P-frameat I. Once a new I-frame is received, the previous I-frame IF-1 andP-frames P1-P10 are cleared from the memory and the process is repeatedfor IF-2 and the subsequent P-frames. The header data in BF-1 may bestored once and kept for the duration of the stream. If the streamingvideo changes in a manner that alters the header data, new header datamay be received and stored in BF-1 and the previous header data may becleared.

With reference to FIG. 10, after a number of sets of I and P-frames havebeen stored and cleared by the buffer system, recording may be requestedby a user at J. The recording request is likely to occur during aP-frame, shown as P5. When recording is requested, the buffer systemretrieves the header information from BF-1 and placed at the beginningof the recording at X. The previous I-frame IF-550 and subsequentP-frames P1-P4 up to the initiation of recording are retrieved from thesecond buffer BF-2 and placed in the recording after the headerinformation at Y. The frame at which recording was initiated (P5) andthe subsequent P-frames and I-frames are then added to the bufferedframes as they occur to form a complete recording without missing I andP-frames at the beginning.

The UTC time offset may need to be recalculated for temporal video sincethe true start time is a short time (e.g., a number of ms) prior to theactual recording start time. Recalculating the offset may align theplayback, improving video record quality/cadence and increasingsmoothness by eliminating/mitigating recording jitter. In temporalvideo, each frame generally has associated therewith a time offset fromthe start of the initial stream. The time offset is typically measuredin milliseconds, however, other units may be used. The offset value maybe tied or zeroed to the first frame or it may be based on the timeelapsed since an earlier reference date (for example, Jan. 1, 1904). Asshown in FIG. 11, the first time offset may be assigned a time of t1,which is either 0 or the time from a reference date. If a recording isstarted at t=t20, then the time index of t20 is saved and the dynamicbuffer lays down the PPS and SPS header information and frames t12through t19 (the I and P-frames preceding the initiation of recording)and the video stream is continued, as described above. In order to havean accurate time offset, the initial reference needs to be reset to t0.In the example shown in FIG. 11, t0=t12−t12 and all subsequent framesrecorded will have an adjusted time index of tx−t12 for the recordedvideo. For the example shown, the time index would be t8 (t20−t12).

The streaming and recording system described above may be highlyeffective for sports that tend to be “discontinuous” in nature (e.g.,have many starts and stops). Examples of discontinuous sports mayinclude football, tennis, golf, baseball, etc. In discontinuous sports,there may be natural breaking points where streaming video may berecorded in finite segments that can be easily cataloged. In football,for example, each play is discrete (i.e., has a definitive beginning andend) and each team is either on offense or defense, but not both (atleast to start a play). Therefore, an operator of the system can easilystart and stop a recording at the beginning and end of each play and therecording can be categorized based on factors like offense/defense, downnumber, quarter, etc. Similarly, for baseball, each at-bat is a discreteevent, each team is either batting or fielding, and plays could becategorized based on inning, out number, hitting/fielding, etc.

Not all sports are discontinuous, however, and may not have naturalstart and stopping points for an operator to initiate and endrecordings. These sports may be called “continuous,” and may includesports such as soccer, lacrosse, hockey, etc. In continuous sports,which team is on offense or defense may change constantly and/or withoutstoppages or designated intervals. Recordings of continuous sports maybe done, as described above, but may be more difficult to categorize dueto the reduced number of defined stoppages and/or more fluid changes inpossession or role. Accordingly, it may be difficult for an operator tostart and stop a recording of a video stream, since they may not knowwhen an important event is going to happen. It may, however, still beuseful to have instantly available discrete recordings of gameplay forreplay or for analysis by coaches and/or players (e.g., on the sideline,in the locker room, on the bench, etc.).

In addition to streaming video of the game or event and only recordingdiscrete segments, such as described above, in another embodiment, theentire game or event may be recorded. For continuous sports, therefore,the entire game or event may be recorded and smaller segments, orsub-recordings, may be generated instantaneously as the game or eventhappens. These sub-recordings may then be distributed to the clientdevices in a similar manner as described above for discontinuous sports.This process may also be used for discontinuous sports.

However, generating sub-recordings from an ongoing recording is notpossible using conventional temporal recording techniques. Temporalvideo, such as MP4, is composed of discrete units, called atoms.Included in the atoms are the “mdat” atom, which generally includes theactual audio and video information, and the “moov” atom, which generallyincludes structural or header information about the file, such asduration, dimensions, sample information, and other metadata. Both themdat and moov atoms are required in order for a video player to play avideo file. However, the mdat and/or moov atoms may only includeaccurate information upon a file closure or after the file is written.Therefore, if a segment is started in the middle of a recording or endedbefore the end of a recording, the segment will not include the mdatand/or moov atoms necessary for the segment to be played back.Accordingly, such incomplete segments could not be played by a user froma client device while the game or event is still ongoing (and thereforestill being recorded).

In one embodiment, playable sub-recordings may be generated as the gameor event is being recorded by generating stand-alone syntheticsub-recordings with mdat and moov data. Accordingly, even if the mdatand/or moov data for the entire game or event recording has not beenwritten yet, the synthetic sub-recordings will have mdat and moov dataand will therefore be playable by a user on a client device. An operatorof the system may watch or monitor the game or event, similar to anoperator monitoring the streaming video for a discontinuous sport, andmay designate “start” and “stop/end” times. The system may then copy thevideo segment of the recording corresponding to the start and end timesand insert the mdat and moov data to generate the stand-alonesub-recording.

As discussed above, continuous sports, by their nature, are not easilybroken into discrete segments. In addition, it is not always possible toanticipate when an important event will occur. In football, adiscontinuous sport, it is certain that the important action will occurduring a discrete play (e.g., between the players breaking the huddleand the play ending in a tackle, score, turnover, etc.). However, in acontinuous sport, like soccer, there may be stretches of time where noscoring or otherwise significant action occurs and then there is asudden flurry of activity. Since there may be no periodic or scheduledbreaks in the action, an operator may not be able to anticipate when todesignate a start and/or end time for a sub-recording. Accordingly, thesystem may allow the operator to designate an end time and then copy aportion of the recording corresponding to a certain amount of time priorto the end time to generate the sub-recording. For example, if a teamscores a goal in soccer, the operator may indicate an end time after thegoal is scored and then choose to generate a sub-recording starting oneminute prior to the end time in order to capture the goal itself andsome of the build-up. If the operator wants to capture a longer periodof time, for example if the play had a long build-up, he could choose alonger recording time, such as two or three minutes. The system mayallow the user to select the length of each sub-recording every time theoperator designates an end time. The system may also include pre-settimes, such as 15 seconds, 30 seconds, 1:00, 1:30, 2:00, 2:30, 3:00, orany other potentially useful denomination. The pre-set times may beadjusted prior to or during a game or event.

While the system and methods of recording has been described above withreference to continuous and discontinuous sporting events or otherevents, they may be used in other applications, as well. For example,the system and methods may be applied to security systems. If a securitysystem includes a security guard or other person that monitors livestreaming feeds, the guard may start and stop recording of the streamingvideo, similar to the discontinuous sports/events above, if he seessomething of interest transpiring. If there is no continuous monitoring,or as an additional backup to human monitoring, a security system mayinclude sensors and/or motion sensing camera technology to start and endrecording. For example, is a security camera detects motion, it couldinitiate recording of a streaming video or initiate recording of asub-recording and continue recording until the motion stops or for apre-determined amount of time and then end the recording. Similarly, ifa window or door sensor, a smoke/fire detector, or other sensor istripped, the system may initiate recording and continue for as long asthe tripping activity continues or for a pre-determined amount of time.In addition, the system may use the detection of an event as an endpoint and generate a start point a certain period of time prior to theend point, such as a minute, two minutes, etc. (similar to continuoussports). Therefore, the cause of a detection event may be recorded.

A combination of the two methods may also be used. For example, if adoor sensor is tripped, the system may initiate recording and maintainrecording for a certain amount of time, such as five minutes. The systemmay also include a recording of a certain period of time prior to thesensor being tripper, for example, one minute. Accordingly, the cause ofthe sensor tripping (time prior to the “start point”) may be recorded,as well as what happens after the sensor is tripped (time from the“start point” to the “end point”). Therefore, for a break-in, both howthe intruder got in and what he does after may be recorded.

Similar to the sporting or other events, a user may access therecordings on a client device as soon as they are recorded. A user maytherefore remotely review targeted security footage and decide iffurther action needs to be taken without scanning through hours ofmostly uneventful video. In addition to security systems, otherapplications for the system and methods may include recording recurringevents in the home, such as when a vehicle enters/exits the driveway orgarage, when a dog/cat enters or exits a doggy door, a delivery is madeto the door or mail is delivered, children leave or arrive from schoolor other activities, etc. The recordings may be sent to a client device(e.g., emailed, texted, pushed, etc.) or accessed remotely via a browseror other internet-enabled device. Numerous commercial or industrialapplications are also possible with the system and methods, such astracking deliveries and receivables, monitoring arrival and departuretimes, or others. Similar to the home applications, recordings may besent, pushed, or otherwise accessed by managers or business owners.

To provide additional context for various aspects of the presentdisclosure, the following discussion is intended to provide a brief,general description of a suitable computing environment in which thevarious aspects of the disclosure may be implemented. While one or moreembodiments of the disclosure relates to the general context ofcomputer-executable instructions that may run on one or more computers,those skilled in the art will recognize that the subject matter also maybe implemented in combination with other program modules and/or as acombination of hardware and software.

Generally, program modules include routines, programs, components, datastructures, etc., that perform particular tasks or implement particularabstract data types. Moreover, those skilled in the art will appreciatethat aspects of the inventive methods may be practiced with othercomputer system configurations, including single-processor ormultiprocessor computer systems, minicomputers, mainframe computers, aswell as personal computers, hand-held wireless computing devices,microprocessor-based or programmable consumer electronics, and the like,each of which can be operatively coupled to one or more associateddevices. Aspects of the disclosure may also be practiced in distributedcomputing environments where certain tasks are performed by remoteprocessing devices that are linked through a communications network. Ina distributed computing environment, program modules may be located inboth local and remote memory storage devices.

A computer may include a variety of non-transitory computer readablemedia. Non-transitory computer readable media may be any availablemedia, except for a transitory, propagating signal, that can be accessedby the computer and includes both volatile and nonvolatile media,removable and non-removable media. By way of example, and notlimitation, computer readable media may comprise computer storage mediaand communication media. Computer storage media includes volatile andnonvolatile, removable and non-removable media implemented in any methodor technology for storage of information such as computer readableinstructions, data structures, program modules or other data. Computerstorage media includes, but is not limited to, RAM, ROM, EEPROM, flashmemory or other memory technology, CD ROM, digital video disk (DVD) orother optical disk storage, magnetic cassettes, magnetic tape, magneticdisk storage or other magnetic storage devices, or any other mediumwhich may be used to store the desired information and which may beaccessed by the computer.

An exemplary environment for implementing various aspects of the presentdisclosure may include a computer that includes a processing unit, asystem memory and a system bus. The system bus couples system componentsincluding, but not limited to, the system memory to the processing unit.The processing unit may be any of various commercially availableprocessors. Dual microprocessors and other multi-processor architecturesmay also be employed as the processing unit.

The system bus may be any of several types of bus structure that mayfurther interconnect to a memory bus (with or without a memorycontroller), a peripheral bus, and a local bus using any of a variety ofcommercially available bus architectures. The system memory may includeread only memory (ROM) and/or random access memory (RAM). A basicinput/output system (BIOS) is stored in a non-volatile memory such asROM, EPROM, EEPROM, which BIOS contains the basic routines that help totransfer information between elements within the computer, such asduring start-up. The RAM may also include a high-speed RAM such asstatic RAM for caching data.

The computer may further include an internal hard disk drive (HDD)(e.g., EIDE, SATA), which internal hard disk drive may also beconfigured for external use in a suitable chassis, a magnetic floppydisk drive (FDD), (e.g., to read from or write to a removable diskette)and an optical disk drive, (e.g., reading a CD-ROM disk or, to read fromor write to other high capacity optical media such as the DVD). The harddisk drive, magnetic disk drive and optical disk drive may be connectedto the system bus by a hard disk drive interface, a magnetic disk driveinterface and an optical drive interface, respectively. The interfacefor external drive implementations includes at least one or both ofUniversal Serial Bus (USB) and IEEE 1394 interface technologies.

The drives and their associated computer-readable media may providenonvolatile storage of data, data structures, computer-executableinstructions, and so forth. For the computer, the drives and mediaaccommodate the storage of any data in a suitable digital format.Although the description of computer-readable media above refers to aHDD, a removable magnetic diskette, and a removable optical media suchas a CD or DVD, it should be appreciated by those skilled in the artthat other types of media which are readable by a computer, such as zipdrives, magnetic cassettes, flash memory cards, cartridges, and thelike, may also be used in the exemplary operating environment, andfurther, that any such media may contain computer-executableinstructions for performing the methods of the present disclosure.

A number of program modules may be stored in the drives and RAM,including an operating system, one or more application programs, otherprogram modules and program data. All or portions of the operatingsystem, applications, modules, and/or data may also be cached in theRAM. It is appreciated that the subject matter of the present disclosuremay be implemented with various commercially available operating systemsor combinations of operating systems.

It is within the scope of the disclosure that a user may enter commandsand information into the computer through one or more wired/wirelessinput devices, for example, a touch screen display, a keyboard and/or apointing device, such as a mouse. Other input devices may include amicrophone (functioning in association with appropriate languageprocessing/recognition software as known to those of ordinary skill inthe technology), an IR remote control, a joystick, a game pad, a styluspen, or the like. These and other input devices are often connected tothe processing unit through an input device interface that is coupled tothe system bus, but may be connected by other interfaces, such as aparallel port, an IEEE 1394 serial port, a game port, a USB port, an IRinterface, etc.

A display monitor or other type of display device may also be connectedto the system bus via an interface, such as a video adapter. In additionto the monitor, a computer may include other peripheral output devices,such as speakers, printers, etc.

The computer may operate in a networked environment using logicalconnections via wired and/or wireless communications to one or moreremote computers. The remote computer(s) may be a workstation, a servercomputer, a router, a personal computer, a portable computer, a personaldigital assistant, a cellular device, a microprocessor-basedentertainment appliance, a peer device or other common network node, andmay include many or all of the elements described relative to thecomputer. The logical connections depicted include wired/wirelessconnectivity to a local area network (LAN) and/or larger networks, forexample, a wide area network (WAN). Such LAN and WAN networkingenvironments are commonplace in offices, and companies, and facilitateenterprise-wide computer networks, such as intranets, all of which mayconnect to a global communications network such as the Internet.

The computer may be operable to communicate with any wireless devices orentities operatively disposed in wireless communication, e.g., aprinter, scanner, desktop and/or portable computer, portable dataassistant, communications satellite, any piece of equipment or locationassociated with a wirelessly detectable tag (e.g., a kiosk, news stand,restroom), and telephone. This includes at least Wi-Fi (such as IEEE802.11x (a, b, g, n, etc.)) and Bluetooth™ wireless technologies. Thus,the communication may be a predefined structure as with a conventionalnetwork or simply an ad hoc communication between at least two devices.

The system may also include one or more server(s). The server(s) mayalso be hardware and/or software (e.g., threads, processes, computingdevices). The servers may house threads to perform transformations byemploying aspects of the present disclosure, for example. One possiblecommunication between a client and a server may be in the form of a datapacket adapted to be transmitted between two or more computer processes.The data packet may include a cookie and/or associated contextualinformation, for example. The system may include a communicationframework (e.g., a global communication network such as the Internet)that may be employed to facilitate communications between the client(s)and the server(s).

While exemplary embodiments are described above, it is not intended thatthese embodiments describe all possible forms of the invention. Rather,the words used in the specification are words of description rather thanlimitation, and it is understood that various changes may be madewithout departing from the spirit and scope of the invention.Additionally, the features of various implementing embodiments may becombined to form further embodiments of the invention.

What is claimed is:
 1. A computer system for recording a number ofsegments of a discontinuous activity comprising a computer havingnon-transitory memory for storing machine instructions that are to beexecuted by the computer, the machine instructions when executed by thecomputer implement the following functions: streaming temporal video ofthe discontinuous activity to obtain a streamed temporal video having acurrent incomplete segment; dynamically buffering the current incompletesegment to store data associated thereto and a current incompletesegment buffer; receiving first and second inputs to obtain start andend time markers for a first segment of the number of segments;continuously recording the streamed temporal video based on receipt ofthe first input and until receipt of the second input to obtain a rawrecorded first video segment; and generating a recorded first videosegment based on the raw recorded first video segment and the currentincomplete segment data; wherein dynamically buffering includesbuffering an I-frame and one or more P-frames of a number of P-frames,the I-frame having an associated I-frame time marker and the one or moreP-frames having one or more associated P-frame time markers and theP-frames having associated time markers between the I-frame and thestart time marker are included in the current incomplete segment.
 2. Thesystem of claim 1, wherein the functions further comprise bufferingheader information of the streamed temporal video and including theheader information in the recorded first video segment.
 3. The system ofclaim 1, wherein only a most recent I-frame relative to the start timemarker is dynamically buffered.
 4. The system of claim 1, wherein thefunctions further comprise clearing the current incomplete segmentbuffer when a new I-frame is generated.
 5. The system of claim 1,wherein dynamically buffering includes expanding or contracting a sizeof the current incomplete segment buffer based on a size of or thenumber of P-frames.
 6. The system of claim 5, wherein the functionsfurther comprise returning the size of the current incomplete segmentbuffer to an initial size after it has been cleared.
 7. The system ofclaim 1, wherein the functions further comprise adjusting a time offsetof the recorded first video segment.
 8. A method comprising: streamingtemporal video to obtain a streamed temporal video having a currentincomplete segment; receiving a start time marker; and dynamicallybuffering the current incomplete segment to store data associatedthereto and a current incomplete segment buffer; the dynamicallybuffering step including buffering an I-frame and one or more P-framesof a number of P-frames, the I-frame having an associated I-frame timemarker and the one or more P-frames having one or more associatedP-frame time markers and the P-frames having associated time markersbetween the I-frame and the start time marker are included in thecurrent incomplete segment; wherein dynamically buffering includesexpanding or contracting a size of the current incomplete segment bufferbased on a size of or the number of P-frames or a size of the I-frame.9. The method of claim 8, further comprising buffering headerinformation of the streamed temporal video.
 10. The method of claim 8,further comprising: receiving first and second inputs to obtain startand end time markers for a first video segment; continuously recordingthe streamed temporal video based on receipt of the first input anduntil receipt of the second input to obtain a raw recorded first videosegment; and generating a recorded first video segment based on the rawrecorded first video segment and the current incomplete segment data.11. The method of claim 10, wherein the functions further compriseadjusting a time offset of the recorded first video segment.
 12. Themethod of claim 8, wherein only a most recent I-frame relative to thestart time marker is dynamically buffered.
 13. The method of claim 8,further comprising clearing the current incomplete segment buffer when anew I-frame is generated.
 14. The method of claim 8, further comprisingreturning the size of the current incomplete segment buffer to aninitial size after it has been cleared.
 15. A computer system comprisinga computer having non-transitory memory for storing machine instructionsthat are to be executed by the computer, the machine instructions whenexecuted by the computer implement the following functions: streamingtemporal video to obtain a streamed temporal video having a currentincomplete segment; receiving a start time marker; and dynamicallybuffering the current incomplete segment to store data associatedthereto and a current incomplete segment buffer; the dynamicallybuffering step including buffering an I-frame and one or more P-framesof a number of P-frames, the I-frame having an associated I-frame timemarker and the one or more P-frames having one or more associatedP-frame time markers and the P-frames having associated time markersbetween the I-frame and the start time marker are included in thecurrent incomplete segment; wherein dynamically buffering includesexpanding or contracting a size of the current incomplete segment bufferbased on a size of or the number of P-frames or a size of the I-frame.16. The system of claim 15, wherein the functions further comprisereturning the size of the current incomplete segment buffer to aninitial size after it has been cleared.
 17. The system of claim 15,wherein only a most recent I-frame relative to the start time marker isdynamically buffered.
 18. The system of claim 15, wherein the functionsfurther comprise clearing the current incomplete segment buffer when anew I-frame is generated.
 19. A computer system comprising a computerhaving non-transitory memory for storing machine instructions that areto be executed by the computer, the machine instructions when executedby the computer implement the following functions: streaming temporalvideo to obtain a streamed temporal video having a current incompletesegment; receiving a start time marker; dynamically buffering thecurrent incomplete segment to store data associated thereto and acurrent incomplete segment buffer; the dynamically buffering stepincluding buffering an I-frame and one or more P-frames of a number ofP-frames and expanding or contracting a size of the current incompletesegment buffer based on a size of or the number of P-frames; receivingfirst and second inputs to obtain the start time marker and an end timemarker for a first video segment; continuously recording the streamedtemporal video based on receipt of the first input and until receipt ofthe second input to obtain a raw recorded first video segment; andgenerating a recorded first video segment based on the raw recordedfirst video segment and the current incomplete segment data.
 20. Thesystem of claim 19, wherein the I-frame has an associated I-frame timemarker and the one or more P-frames have one or more associated P-frametime markers and the P-frames having associated time markers between theI-frame and the start time marker are included in the current incompletesegment.
 21. The system of claim 19, wherein only a most recent I-framerelative to the start time marker is dynamically buffered.
 22. A methodcomprising: streaming temporal video of an event to obtain a streamedtemporal video having a current incomplete segment; receiving first andsecond inputs to obtain start and end time markers for a first videosegment, the start and end time markers being associated with a startand end of a segment of the event; dynamically buffering the currentincomplete segment to store data associated thereto and a currentincomplete segment buffer, the dynamic buffering including buffering anI-frame and one or more P-frames of a number of P-frames, the I-framehaving an associated I-frame time marker and the one or more P-frameshaving one or more associated P-frame time markers and the P-frameshaving associated time markers between the I-frame and the start timemarker are included in the current incomplete segment; continuouslyrecording the streamed temporal video based on receipt of the firstinput and until receipt of the second input to obtain a raw recordedfirst video segment; generating a recorded first video segment based onthe raw recorded first video segment and the current incomplete segmentdata; and distributing the recorded first video segment to a remotedevice over a network.
 23. The method of claim 22, wherein dynamicallybuffering includes expanding or contracting a size of the currentincomplete segment buffer based on a size of or the number of P-framesor a size of the I-frame.